package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "supplier_product",  catalog = "")
public class SupplierProduct implements Serializable {
    private Long id;
    private Long proTime; //创建时间
    private String proUuid;
    private String supUuid;
    private String supName;
    private String proName;
    private String proPrice;
    private String proUnit;
    private String remark;

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    @Basic
    @Column(name = "pro_time")
    public Long getProTime() {
        return proTime;
    }

    public void setProTime(Long proTime) {
        this.proTime = proTime;
    }


    @Basic
    @Column(name = "pro_uuid")
    public String getProUuid() {
        return proUuid;
    }

    public void setProUuid(String proUuid) {
        this.proUuid = proUuid;
    }

    @Basic
    @Column(name = "sup_uuid")
    public String getSupUuid() {
        return supUuid;
    }

    public void setSupUuid(String supUuid) {
        this.supUuid = supUuid;
    }

    @Basic
    @Column(name = "sup_name")
    public String getSupName() {
        return supName;
    }

    public void setSupName(String supName) {
        this.supName = supName;
    }

    @Basic
    @Column(name = "pro_name")
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "pro_price")
    public String getProPrice() {
        return proPrice;
    }

    public void setProPrice(String proPrice) {
        this.proPrice = proPrice;
    }

    @Basic
    @Column(name = "pro_unit")
    public String getProUnit() {
        return proUnit;
    }

    public void setProUnit(String proUnit) {
        this.proUnit = proUnit;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SupplierProduct that = (SupplierProduct) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(proUuid, that.proUuid) &&
                Objects.equals(supUuid, that.supUuid) &&
                Objects.equals(supName, that.supName) &&
                Objects.equals(proName, that.proName) &&
                Objects.equals(proPrice, that.proPrice) &&
                Objects.equals(proUnit, that.proUnit) &&
                Objects.equals(remark, that.remark);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, proUuid, supUuid, supName, proName, proPrice, proUnit, remark);
    }
}
